class TeacherService {

    def authenticateService
    boolean transactional = true

    def serviceMethod() {

    }
    def getSchoolMasterTeacher(school) {
            return Role.findByAuthority(authenticateService.securityConfig.security.masterRole).people.grep{
                it.school.id == school.id && it.enabled == true
            }
    }

    def getSchoolCourseTeacher() {
//            return Role.findByAuthority(authenticateService.securityConfig.security.masterRole).people.grep{
//                it.school.id == session.school.id
//            }
    }

    def getSchoolAndAbeldTeacher(school) {
            def c = Teacher.createCriteria()
            def results = c {
                eq ("school" , school)
                //eq ("state" , false)
                eq ("enabled" , true)
            }
            log.info("laile ")
            return results
    }
}
